package com.sit.vo;


import lombok.Data;

import java.util.List;

//viewobject视图对象，用于将实体类entity转换成视图中的json格式的对象
@Data
public class DataVO<T> {
    //视图中需要的格式就是这4个属性
    private Integer code;
    private String msg;
    private Long count;
    private List<T> data;//泛型，你传过来什么类型，我这边就是什么类型

    public void setCode(Integer code) {
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public List<T> getData() {
        return data;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public void setCount(Long count) {
        this.count = count;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    public Long getCount() {
        return count;
    }
}
